home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_1 / jpdoor32.zip / SYSOPKEY.PAS < prev    next >
Pascal/Delphi Source File  |  1992-02-26  |  2KB  |  62 lines

  1. {$F+}
  2.  
  3. (* This include file is where you will take actions you define when trapped
  4.    keys such as ALT-keys, Function-keys, etc., are pressed.
  5.  
  6.    You will need to setup your procedures here which in turn may call other
  7.    procedures within your code or you may do all you need to do right here.
  8.  
  9.    For example, if you wanted to trap for ALT-C being pressed on the local
  10.    keyboard and then call the procedure CHAT:
  11.  
  12.    Your main block of code might look like this:
  13.  
  14.    BEGIN  {main}
  15.       ASSIGN(Output,'') ;
  16.       REWRITE(Output) ;
  17.       SysopKey[1] := #0 + #46 ;   {define ALT-C as one of twenty keys }
  18.                                   {to trap                            }
  19.       SysopProc[1] := ALT_C ;     {define procedure as defined here   }
  20.       SysopKey ;                  {setup for far call to this file    }
  21.    END ;
  22.  
  23.    Now, whenever ALT-C is pressed, the following procedure will be called:
  24.  
  25.    PROCEDURE ALT_C ;
  26.    BEGIN
  27.       CHAT ;                      {call procedure CHAT which is located }
  28.    END ;                          {within your program's code           }
  29.  
  30.    *)
  31.  
  32. (*
  33.    The following procedures are called when up/down arrows are pressed
  34.    provided they are defined using SysopKey[] and SysopProc[] within
  35.    the main program code
  36. *)
  37.  
  38. PROCEDURE UP_ARROW ;
  39. BEGIN
  40.    {up-arrow key defined as #0 + #72 }
  41.    RaiseTime ;
  42. END ;
  43.  
  44. PROCEDURE DOWN_ARROW ;
  45. BEGIN
  46.    {down-arrow key defined as #0 + #80 }
  47.    LowerTime ;
  48. END ;
  49.  
  50. (* PROCEDURE CTRL_R ;
  51.    BEGIN
  52.       ReDraw ;
  53.    END ;
  54. *)
  55.  
  56. (* PROCEDURE ALT_C ;
  57.    BEGIN
  58.       Chat ;
  59.    END ;
  60. *)
  61. {$F-}
  62.